var nf = sm("do_Notification");
var openHelper = require("helper/open");
var friendHelper = require("helper/friend");
var root = ui("$");
root.setMapping({
	"imgfullLogo.tag":"id",
	"imgfullLogo.source":"fullLogo",
	"lableNick.text":"nick",
	"lableFriendShipDesc.text" : "friendShipDesc",
	"btnAddFriend.visible" : "showAddBtn"
});

ui("btnAddFriend").on("touch",function(){
	var userId = ui("imgfullLogo").tag;//用户id
	friendHelper.addFriendApply(userId,function(data){
		ui("btnAddFriend").hide();
		ui("lableFriendShipDesc").text="等待验证";
		nf.toast("已成功提交好友申请");
	});
})

ui("do_ALayout_Pic").on("touch",function(){
	var userId = ui("imgfullLogo").tag;//用户id
	if(userId!=null){
		openHelper.openPersonal(userId);//到他的主页
	}
})